Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Only set deprecated property when supported #621

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Rbiessy
Copy link
Contributor

@Rbiessy Rbiessy commented Dec 12, 2024

Description

CMake versions older than 3.22 do not supported setting the deprecated property on an INTERFACE target.
I have tested with CMake 3.22 and 3.13 locally.

Fixes #619

@Rbiessy Rbiessy requested a review from a team as a code owner December 12, 2024 10:28
@Rbiessy Rbiessy force-pushed the romain/fix_minimum_cmake branch from 20d671e to e584a00 Compare December 12, 2024 10:33
@s-Nick
Copy link
Contributor

s-Nick commented Dec 12, 2024

what happen if the cmake version is older than 3.22? Don't we want to manually leave a deprecation message or something?

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Dec 12, 2024

what happen if the cmake version is older than 3.22? Don't we want to manually leave a deprecation message or something?

The deprecation property is used to only add a message if a deprecated target is used. In our case we want the deprecated target to be an alias of the new target which does not seem to be possible before 3.22. Adding a message() would be printed even in valid usages so we can't do this.
Users using the minimum CMake version won't get a warning when using a deprecated target unfortunately. I don't think this is a good enough reason to bump the CMake version but that would be fine with me.

Copy link
Contributor

@s-Nick s-Nick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Dec 13, 2024

Pinging @vmalia since you are around. Could your team help review this by the end of next week?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cmake] Update supported cmake version
2 participants